package com.fitbet.api.service.impl;

import java.util.Date;
import org.springframework.stereotype.Service;
import com.demo2do.core.persistence.annotation.Dao;
import com.fitbet.api.dao.BetDao;
import com.fitbet.api.service.BetService;
import com.fitbet.entity.bet.Bet;
import com.fitbet.entity.bet.BetStatus;
/**
 * 
 * @author sjh
 *
 */
@Service("BetService")
public class BetServiceImpl implements BetService{

    //private static final Logger logger = LoggerFactory.getLogger(BetServiceImpl.class);
    
    @Dao    
    private BetDao betDao;

    /*
     * (non-Javadoc)
     * @see com.fitbet.api.service.BetService#loadCurrentBet(java.util.Date)
     */
    public Bet loadCurrentBet(Date time) {
        return betDao.loadCurrentBet(BetStatus.PROCESSING);
    }
    
    /*
     * (non-Javadoc)
     * @see com.fitbet.api.service.BetService#loadBet(java.lang.Long)
     */
    public Bet loadBet(Long betId) {
        return betDao.loadBet(betId, BetStatus.PROCESSING);
    }

}
